home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #11 / Amiga Plus CD - 2004 - No. 11.iso / AmiSoft / Dev / misc / LOCCounter.lha / LOCCounter / src / Tally.h < prev   
C/C++ Source or Header  |  2004-08-17  |  946b  |  48 lines

  1. #ifndef LOC_TALLY_H
  2. #define LOC_TALLY_H
  3. /****************************************************************************
  4. *
  5. * $RCSfile: Tally.h $
  6. * $Revision: 2.9 $
  7. * $Date: 2004/08/17 23:02:55 $
  8. * $Author: ssolie $
  9. *
  10. *****************************************************************************
  11. *
  12. * Copyright (c) 2004 Steven Solie.  All Rights Reserved.
  13. *
  14. *****************************************************************************
  15. *
  16. * Tally component
  17. */
  18.  
  19. #include <dos/dos.h>
  20.  
  21. #include <list>
  22.  
  23. #include <boost/shared_ptr.hpp>
  24.  
  25.  
  26. class FileCount;
  27. class FileTally;
  28.  
  29. class Tally {
  30. public:
  31.     Tally(bool diff_mode);
  32.     ~Tally();
  33.     void addFile(FileCount& fc);
  34.     void print(const BPTR fh);
  35.     void printTotal(const BPTR fh) const;
  36.     void printQuick(const BPTR fh) const;
  37. private:
  38.     std::list< boost::shared_ptr<FileTally> > m_files;
  39.     uint32 m_num_files;
  40.     uint32 m_total_loc;
  41.     uint32 m_total_added_loc;
  42.     uint32 m_total_deleted_loc;
  43.     bool m_diff_mode;
  44. };
  45.  
  46.  
  47. #endif
  48.